Motor-driven compressor for a vehicle

ABSTRACT

A motor-driven compressor for a vehicle includes a housing, a compression unit, a motor, and an inverter device. The inverter device includes an inverter circuit, a capacitor, a current sensor, a determination means configured to control switching elements in response to the current sensor not detecting a flow of current when the motor stops operating and configured to determine whether or not the current sensor detects a flow of current when controlling the switching elements, and a discharge starting means configured to start discharging the capacitor when the determination means determines that the flow of current has not been detected.

BACKGROUND OF THE INVENTION

The present invention relates to a motor-driven compressor for avehicle, more specifically, to a technique for detecting when acapacitor starts discharging.

Japanese Patent No. 4898964 discloses a motor-driven compressorincluding a capacitor, a current detection means, and a load resistor.The capacitor is connected to a power supply line and a ground line. Thecurrent detection means is arranged on the power supply line between thecapacitor and a power source connection means. The current detectionmeans detects whether the current flowing from a power source toward apower element is positive or negative. The load resistor is locatedbetween the current detection means and the power source connectionmeans. The load resistor connects the power supply line to the groundline. When current flows from the power element toward the power source,disconnection of the power source from the power source connection meansis detected. When the power source is disconnected, the power sourcestops supplying current to the capacitor. Thus, the capacitor startsdischarging the accumulated electric charges so that the dischargedelectric charges flow to the load resistor.

A typical motor-driven compressor for a vehicle includes a housing, acompression unit, a motor, and an inverter device. The compression unitand the motor are arranged in the housing. The motor-driven compressormay include a resistor located between a connector, which is connectedto a power source, and a capacitor across the power source and ground.The motor-driven compressor may further include a current sensor locatedbetween the resistor and the capacitor. In this case, disconnection ofthe connector from the power source is determined when current flows tothe current sensor in a direction opposite to when the motor isoperating. The resistor is connected in parallel to the capacitor. Thus,power is consumed even during normal operation of the motor. This maylower the efficiency of the motor-driven compressor and generate heatthat damages elements.

SUMMARY OF THE INVENTION

It is an object of the present invention to provide a motor-drivencompressor for a vehicle that reduces power consumption and startsdischarging a capacitor when a line that supplies an inverter circuitwith power is interrupted when the motor stops operating.

A motor-driven compressor for a vehicle that achieves the above objectincludes a housing, a compression unit arranged in the housing, a motorarranged in the housing and configured to drive the compression unit,and an inverter device that supplies the motor with power. The inverterdevice includes an inverter circuit including a plurality of switchingelements that are bridge-connected between a positive electrode bus barand a negative electrode bus bar that are connected to a DC powersource. The inverter circuit is configured to drive the motor byexecuting activation and deactivation control on the switching elementsto convert DC power from the DC power source into AC power and supplythe AC power to a coil of the motor. The inverter device furtherincludes a capacitor connected to the positive electrode bus bar and thenegative electrode bus bar between the inverter circuit and the DC powersource, a current sensor located between the capacitor and the DC powersource on the positive electrode bus bar or the negative electrode busbar, a determination means configured to control the switching elementsin response to the current sensor not detecting a flow of current whenthe motor stops operating and configured to determine whether or not thecurrent sensor detects a flow of current when controlling the switchingelements, and a discharge starting means configured to start dischargingthe capacitor when the determination means determines that the flow ofcurrent has not been detected.

A motor-driven compressor for a vehicle that achieves the above objectincludes a housing, a compression unit arranged in the housing, a motorarranged in the housing and configured to drive the compression unit,and an inverter device that supplies the motor with power. The inverterdevice includes an inverter circuit including a plurality of switchingelements that are bridge-connected between a positive electrode bus barand a negative electrode bus bar that are connected to a DC powersource, wherein the inverter circuit is configured to drive the motor byexecuting activation and deactivation control on the switching elementsto convert DC power from the DC power source into AC power and supplythe AC power to a coil of the motor, a capacitor connected to thepositive electrode bus bar and the negative electrode bus bar betweenthe inverter circuit and the DC power source, a current sensor locatedbetween the capacitor and the DC power source on the positive electrodebus bar or the negative electrode bus bar, and circuitry. The circuitryis configured to control the switching elements in response to thecurrent sensor not detecting a flow of current when the motor stopsoperating and is configured to determine whether or not the currentsensor detects a flow of current when controlling the switchingelements, and the circuitry is configured to start discharging thecapacitor when determining that the flow of current has not beendetected.

Other aspects and advantages of the present invention will becomeapparent from the following description, taken in conjunction with theaccompanying drawings, illustrating by way of example the principles ofthe invention.

BRIEF DESCRIPTION OF THE DRAWINGS

The invention, together with objects and advantages thereof, may best beunderstood by reference to the following description of the presentlypreferred embodiments together with the accompanying drawings in which:

FIG. 1 is a partial cutaway view schematically showing one embodiment ofa motor-driven compressor for a vehicle;

FIG. 2 is a circuit diagram of the motor-driven compressor of FIG. 1;

FIG. 3 is a flowchart illustrating the operation of the motor-drivencompressor of FIG. 2;

FIG. 4 is a circuit diagram illustrating the operation of themotor-driven compressor of FIG. 2;

FIG. 5 is a circuit diagram illustrating the operation of themotor-driven compressor of FIG. 2;

FIG. 6 is a circuit diagram illustrating the operation of themotor-driven compressor of FIG. 2; and

FIG. 7 is a circuit diagram of a comparative example.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

One embodiment of the present invention will now be described withreference to the drawings.

A motor-driven compressor for a vehicle of the present embodiment isused with, for example, a vehicle air conditioner. Refrigerant as afluid is to be compressed in the motor-driven compressor in the presentembodiment.

As shown in FIG. 1, an air conditioner 10 for a vehicle includes amotor-driven compressor 20 and an external refrigerant circuit 100 thatsupplies the motor-driven compressor 20 with refrigerant. The externalrefrigerant circuit 100 includes, for example, a heat exchanger and anexpansion valve. The air conditioner 10 compresses refrigerant with themotor-driven compressor 20 and exchanges heat with and expands therefrigerant with the external refrigerant circuit 100. This cools andheats the passenger compartment of the vehicle.

The air conditioner 10 includes an air-conditioning ECU 101 thatcontrols the entire air conditioner 10. The air-conditioning ECU 101 isconfigured to acknowledge, for example, a passenger compartmenttemperature and a preset temperature. Based on these parameters, theair-conditioning ECU 101 transmits various instructions such asactivation and deactivation instructions to the motor-driven compressor20.

The motor-driven compressor 20 includes a housing 21, a compression unit22, and a three-phase motor 23 for a vehicle. The housing 21 includes asuction port 21 a into which refrigerant is drawn from the externalrefrigerant circuit 100. The compression unit 22 and the three-phasemotor 23, which serve as an electric motor, are accommodated in thehousing 21.

The entire housing 21 is cylindrical. The housing 21 includes adischarge port 21 b from which refrigerant is discharged.

The compression unit 22 compresses the refrigerant drawn into thehousing 21 through the suction port 21 a and discharges the compressedrefrigerant out of the discharge port 21 b. The specific structure ofthe compression unit 22 may be of any type such as a scroll type, apiston type, or a vane type.

The three-phase motor 23 drives the compression unit 22. The three-phasemotor 23 includes, for example, a cylindrical rotation shaft 26supported to be rotatable relative to the housing 21, a cylindricalrotor 24 fixed to the rotation shaft 26, and a stator 25 fixed to thehousing 21. The rotor 24 includes a cylindrical rotor core 24 b in whichpermanent magnets 24 a are embedded. The axial direction of the rotationshaft 26 coincides with the axial direction of the cylindrical housing21. The stator 25 includes a cylindrical stator core 25 a and coils 25 bwound around the teeth of the stator core 25 a. The rotor 24 opposes thestator 25 in the radial direction of the rotation shaft 26.

The motor-driven compressor 20 includes an inverter unit 30. Theinverter unit 30 includes an inverter device 31 that drives thethree-phase motor 23 and a case 32 that accommodates the inverter device31. The coils 25 b of the three-phase motor 23 are electricallyconnected to the inverter device 31. The case 32 is fixed to the housing21 by bolts 33 serving as fasteners. That is, the inverter device 31 isintegrated with the motor-driven compressor 20 of the presentembodiment.

The inverter device 31 includes a circuit board 34 and a power module 35that is electrically connected to the circuit board 34. Variouselectronic components are arranged on the circuit board 34. A connector36 is arranged on an outer surface of the case 32. The circuit board 34is electrically connected to the connector 36. The connector 36 suppliesthe inverter device 31 with power and electrically connects theair-conditioning ECU 101 to the inverter device 31.

In this manner, the motor-driven compressor 20 includes the compressionunit 22, which is arranged in the housing 21, the three-phase motor 23,which is arranged in the housing 21 and drives the compression unit 22,and the inverter device 31, which supplies the three-phase motor 23 withpower.

As shown in FIG. 2, the vehicle including the motor-driven compressor 20includes a battery 50. Power is supplied from the battery 50 to electricdevices 60 and 70 for a vehicle other than the motor-driven compressor20.

As shown in FIG. 2, the inverter device 31 includes an inverter circuit43, a capacitor 46 (smoothing capacitor), a current sensor 47, and acontroller 48. The three-phase motor 23 includes coils 40, 41, and 42(corresponding to coils 25 b shown in FIG. 1) that are in a starconnection. The controller 48 may be circuitry including one or morededicated hardware circuits such as an application-specific integratedcircuit (ASIC), one or more processors running on computer programs(software), or a combination of a hardware circuit and a processor. Theprocessor includes a CPU and a memory such as a ROM or a RAM, whichstore programs executed by the CPU. The memory, or computer readablemedium, includes any type of medium that is accessible by a versatilecomputer or a dedicated computer.

The inverter circuit 43 is connected to the battery 50 by a system mainrelay 51. The system main relay 51 is a positive electrode terminalcontact. The battery 50 includes a positive electrode terminal connectedby the system main relay 51 to a positive electrode bus bar Lp of theinverter circuit 43. Further, a negative electrode terminal of thebattery 50 is connected to a negative electrode bus bar Ln of theinverter circuit 43. A vehicle ECU makes the system main relay 51 incontact when a start key of the vehicle is activated and makes thesystem main relay 51 out of contact when the start key is deactivated.

The inverter circuit 43 includes the positive electrode bus bar Lp, thenegative electrode bus bar Ln, and bridge-connected switching elementsQ1, Q2, Q3, Q4, Q5, and Q6. More specifically, the inverter circuit 43includes six switching elements Q1 to Q6 and six diodes D1 to D6.Insulated gate bipolar transistors (IGBTs) are used as the switchingelements Q1 to Q6. Instead, power metal-oxide-semiconductor field-effecttransistors (MOSFETs) may be used as the switching elements Q1 to Q6.Between the positive electrode bus bar Lp and the negative electrode busbar Ln, the switching elements Q1 and Q2 are connected in series, theswitching elements Q3 and Q4 are connected in series, and the switchingelements Q5 and Q6 are connected in series. The diodes D1 to D6 areconnected in anti-parallel to the switching elements Q1 to Q6,respectively. The three-phase motor 23 (more specifically, coil 40) isconnected between the switching elements Q1 and Q2, the three-phasemotor 23 (more specifically, coil 41) is connected between the switchingelements Q3 and Q4, and the three-phase motor 23 (more specifically,coil 42) is connected between the switching elements Q5 and Q6.

A control terminal (gate terminal of IGBT) of each of the switchingelements Q1 to Q6 is connected to the controller 48. The controller 48controls activation and deactivation of the switching elements Q1 to Q6.When switching control is performed on the switching elements Q1 to Q6,the inverter circuit 43 converts the direct current supplied from thebattery 50 into three-phase alternating current having a suitablefrequency and supplies the converted three-phase alternating current tothe coils 40 to 42 for the three phases of the three-phase motor 23.That is, when switching operation is performed on the switching elementsQ1 to Q6, the three-phase coils 40 to 42 of the three-phase motor 23 aresupplied with current to drive the three-phase motor 23.

In this manner, in the inverter circuit 43, the switching elements Q1 toQ6 are bridge-connected between the positive electrode bus bar Lp andthe negative electrode bus bar Ln, which are connected to the battery 50serving as a DC power source. Activation and deactivation control isperformed on the switching elements Q1 to Q6 so that the invertercircuit 43 converts the DC power from the battery 50 into AC power andsupplies the AC power to the coils 40 to 42 of the three-phase motor 23to drive the coils 40 to 42.

The capacitor 46 is connected to the positive electrode bus bar Lp andthe negative electrode bus bar Ln at the preceding stage of the invertercircuit 43 (at side closer to battery 50). That is, the capacitor 46 isconnected to the positive electrode bus bar Lp and the negativeelectrode bus bar Ln between the inverter circuit 43 and the battery 50.Further, a coil 45 is arranged on the positive electrode bus bar Lpbetween the capacitor 46 and the battery 50. The capacitor 46 and thecoil 45 form an input filter 44.

In addition, the current sensor 47 is located between the capacitor 46and the battery 50 on the negative electrode bus bar Ln. The currentsensor 47 can be formed by, for example, a shunt resistor or a Hallelement.

The connector 36 connects the battery 50 to the motor-driven compressor20 so that power is supplied from the battery 50 to the motor-drivencompressor 20 via the connector 36. More specifically, power is suppliedto the inverter circuit 43 via the input filter 44.

A connector 61 connects the battery 50 to the electric device 60 so thatpower is supplied from the battery 50 to the electric device 60 via theconnector 61. A connector 71 connects the battery 50 to the electricdevice 70 so that power is supplied from the battery 50 to the electricdevice 70 via the connector 71.

The operation of the embodiment will now be described.

The controller 48 executes the processes illustrated in FIG. 3 when themotor stops operating.

As shown in FIG. 3, in step S100, the controller 48 detects inputcurrent based on a signal from the current sensor 47. In step S101, thecontroller 48 detects whether or not current is flowing. For example,the controller 48 determines whether or not a value detected by thecurrent sensor 47 is within a predetermined range. In step S100, currentis detected when the electric devices 60 and 70 are connected to thebattery 50 and AC components flow into the capacitor 46. For example,current ripples flowing into the inverter 43 are detected when theelectric devices 60 and 70 are operating. This indicates that theconnector 36 and at least one of the connector 61 and the connector 71are connected to the motor-driven compressor 20 and the battery 50, thatis, an input line is connected to the motor-driven compressor 20 and thebattery 50. In other words, step S101 allows for the detection ofnon-operation of the electric devices 60 and 70 or disconnection of theconnectors 61 and 71 (breakage of power input line).

When the current sensor 47 detects the flow of current in step S101, thecontroller 48 proceeds to step S102 and restricts discharging of thecapacitor 46. That is, the capacitor 46 is not discharged because theconnector 36 and at least one of the connector 61 and the connector 71is connected to the motor-driven compressor 20 and the battery 50(connector is connected). More specifically, as shown in FIG. 4, currentflows between the electric device 60 and the capacitor 46 via theconnectors 36 and 61 when the inverter device 31 and the three-phasemotor 23 stop driving, the electric device 60 is operating, and theelectric device 70 stops operating.

In this manner, when the current sensor 47 detects current, thecontroller 48 determines that the electric device 60 is operating andcurrent (for example, current ripple) is flowing into the motor-drivencompressor 20, that is, the input line is connected to the motor-drivencompressor 20 and the battery 50. In this case, the capacitor 46 is notdischarged.

When the current sensor 47 does not detect the flow of current in stepS101 of FIG. 3, the controller 48 proceeds to step S103 and outputspulses to gates of the switching elements Q1 to Q6 of the invertercircuit 43 to control the switching elements Q1 to Q6. For example, asshown in FIG. 5, the controller 48 activates the U-phase upper armswitching element Q1, the V-phase lower arm switching element Q4, andthe W-phase lower arm switching element Q6.

Then, the controller 48 proceeds to step S104 in FIG. 3 and determineswhether or not the current sensor 47 has detected the flow of current.For example, the controller 48 determines whether or not a valuedetected by the current sensor 47 is within a predetermined range. Instep S104, the controller 48 uses the current sensor 47 to check aresponse to the output of pulses to the gates of the switching elementsQ1 to Q6 of the inverter circuit 43.

When the current sensor 47 detects the flow of current in step S104, thecontroller 48 proceeds to step S105 and restricts discharging of thecapacitor 46. That is, since the connector 36 is connected to themotor-driven compressor 20 and the battery 50 (connector is connected),the capacitor 46 is not discharged. More specifically, as shown in FIG.5, when the battery 50 and the motor-driven compressor 20 are connectedby the connector 36, the controller 48 activates the U-phase upper armswitching element Q1, the V-phase lower arm switching element Q4, andthe W-phase lower arm switching element Q6. As a result, current flowsthrough a path in the order of the battery 50, the bus bar Lp, theU-phase upper arm switching element Q1, the coil 40, the coil 41, theV-phase lower arm switching element Q4, the bus bar Ln, and the battery50 and through a path in the order of the battery 50, the bus bar Lp,the U-phase upper arm switching element Q1, the coil 40, the coil 42,the W-phase lower arm switching element Q6, the bus bar Ln, and thebattery 50. Thus, the controller 48 determines that the current sensor47 has detected the flow of current.

In step S104 shown in FIG. 3, when the controller 48 determines that thecurrent sensor 47 has not detected the flow of current, the controller48 determines that the connector has been disconnected (power input linehas been broken). Then, the controller 48 proceeds to step S106 andstarts discharging the capacitor 46. More specifically, as shown in FIG.6, when the connector 36 is disconnected from and not connected to thebattery 50, the controller 48 activates the U-phase upper arm switchingelement Q1, the V-phase lower arm switching element Q4, and the W-phaselower arm switching element Q6. As a result, current flows through apath in the order of the capacitor 46, the bus bar Lp, the U-phase upperarm switching element Q1, the coil 40, the coil 41, the V-phase lowerarm switching element Q4, the bus bar Ln, and the capacitor 46 andthrough a path in the order of the capacitor 46, the bus bar Lp, theU-phase upper arm switching element Q1, the coil 40, the coil 42, theW-phase lower arm switching element Q6, the bus bar Ln, and thecapacitor 46. Thus, the controller 48 determines that the current sensor47 has not detected the flow of current.

In step S106 shown in FIG. 3, the controller 48 starts controlling theswitching elements Q1 to Q6 to start energizing the coils 40 to 42 ofthe motor. This starts discharging the capacitor 46.

More specifically, in step S101 shown in FIG. 3, when the current sensor47 does not detect the flow of current, the controller 48 cannotdetermine whether the electric devices 60 and 70 are all deactivated orthe connector 36 is disconnected. Thus, the controller 48 outputs pulsesto the gates of the switching elements (Q1 to Q6), and the currentsensor 47 detects the response to the output. When the current sensor 47detects the flow of current, that is, when the current sensor 47 detectscurrent, the controller 48 determines that the motor-driven compressor20 is connected to an external device (for example, battery 50). In thiscase, the capacitor 46 is not discharged. When the current sensor 47does not detect the flow of current, that is, when the current sensor 47does not detect current, the controller 48 determines that a linebreakage has occurred because of the disconnection of the connector 36or the like and starts discharging the capacitor 46.

FIG. 7 is a comparative example.

As shown in FIG. 7, in a motor-driven compressor for a vehicle, when theinput voltage is interrupted, the connector is disconnected, or theinput line is broken, a discharge resistor 200 connected in parallel tothe capacitor 46 of the input filter 44 discharges residual electriccharges that remain in the capacitor 46. In this case, the dischargeresistor 200 is connected in parallel to the capacitor 46. Thus, thedischarge resistor 200 consumes power during normal operation. This maylower the efficiency of the motor-driven compressor, heat the dischargeresistor 200, or damage elements located near the discharge resistor200.

The present embodiment includes the current sensor 47 located betweenthe input filter (capacitor 46) and the battery 50. When the currentsensor 47 does not detect the flow of current, the controller 48 servingas a determination means controls the switching elements Q1 to Q6 anddetermines during the control whether or not the current sensor 47 hasdetected the flow of current. When the controller 48 determines thatcurrent is not flowing, the controller 48 serving as a dischargestarting means starts discharging the capacitor 46.

More specifically, when the input voltage is interrupted, the connectoris disconnected, or the input line is broken when the motor isoperating, the motor continues to operate. This allows the capacitor 46,which is charged by the coils 40 to 42 of the motor, to be discharged.However, electric charges cannot be consumed when the motor stopsoperating. Thus, if interruption of the input voltage, disconnection ofthe connector, or breakage of the input line is detected when the motorstops operating, current is supplied to the coils 40 to 42 of the motorsubsequent to the detection to discharge the residual electric chargesfrom the capacitor 46. Thus, in order to detect interruption of theinput voltage or the like when the motor stops operating, the currentsensor 47 is arranged at the outer side of the input filter 44. Thisallows for detection of interruption of the input voltage or the likebased on whether or not current is flowing to the current sensor 47.

In this manner, discharge control is executed when detecting thatdischarging is necessary without elements being damaged by heat andwithout the efficiency being lowered by the discharge resistor 200.

In other words, disconnection of the connector is determined when thecurrent sensor 47 located between the connector 36 and the capacitor 46does not detect the flow of current and the current sensor 47 also doesnot detect the flow of current even though pulses are applied to thegates of the switching elements Q1 to Q6 of the inverter circuit.Accordingly, since the discharge resistor 200 is not used, that is,since the configuration is without a resistor, the efficiency andreliability are high.

The above embodiment has the advantages described below.

(1) The inverter device 31 includes the controller 48, and thecontroller 48 serves as the determination means and the dischargestarting means. If the current sensor 47 does not detect the flow ofcurrent when the motor stops operating, the controller 48 serving as thedetermination means controls the switching elements Q1 to Q6. During thecontrol, the controller 48 determines whether or not the current sensor47 has detected the flow of current. When the determination meansdetermines that current is not flowing, the controller 48 serving as thedischarge starting means starts discharging the capacitor 46. Thus,since a discharge resistor is not connected in parallel to the capacitor46, power consumption is reduced, and the discharging of the capacitor46 is started when a power source line that supplies the invertercircuit 43 with power is interrupted when the motor stops operating.

(2) When the determination means determines that current is not flowing,the controller 48 serving as the discharge starting means startscontrolling the switching elements Q1 to Q6 and starts energizing thecoils 40 to 42 of the motor. This starts discharging the capacitor 46.Thus, the discharging of the capacitor 46 can be easily started bystarting the energizing of the coils 40 to 42. This allows dischargingto be performed without a dedicated discharge resistor.

(3) The electric devices 60 and 70 and the motor-driven compressor 20are connected to the battery 50. In this case, current flows from theelectric devices 60 and 70 to the motor-driven compressor 20. Thus,current is determined to be flowing in step S101 of FIG. 3. Thiseliminates the need to execute the processes of steps S103, S104, andS105 and indicates that the connector 36 is connected to themotor-driven compressor 20 and the battery 50.

It should be apparent to those skilled in the art that the presentinvention may be embodied in many other specific forms without departingfrom the spirit or scope of the invention. Particularly, it should beunderstood that the present invention may be embodied in the followingforms.

The current sensor 47 is located between the capacitor 46 and thebattery 50 on the negative electrode bus bar Ln. Instead, as shown bythe double-dashed lines in FIG. 2, instead of the current sensor 47, acurrent sensor 49 may be arranged on the positive electrode bus bar Lpbetween the capacitor 46 and the battery 50.

The controller 48 serving as the discharge starting means startsdischarging the capacitor 46 when starting the energizing of the coils40 to 42 of the motor. Instead, for example, a series circuit includinga resistor and a switch may be connected between the positive electrodebus bar Lp and the negative electrode bus bar Ln. In this case,discharging is started when the switch closes the circuit of the switchso that current flows to the resistor and discharges the capacitor 46.

The coil 45 may be omitted.

Therefore, the present examples and embodiments are to be considered asillustrative and not restrictive and the invention is not to be limitedto the details given herein, but may be modified within the scope andequivalence of the appended claims.

The invention claimed is:
 1. A motor-driven compressor for a vehiclecomprising: a housing; a compression unit arranged in the housing; amotor arranged in the housing and configured to drive the compressionunit; and an inverter device that supplies the motor with power, whereinthe inverter device includes an inverter circuit including a pluralityof switching elements that are bridge-connected between a positiveelectrode bus bar and a negative electrode bus bar that are connected toa DC power source, wherein the inverter circuit is configured to drivethe motor by executing activation and deactivation control on theswitching elements to convert DC power from the DC power source into ACpower and supply the AC power to a coil of the motor, a capacitorconnected to the positive electrode bus bar and the negative electrodebus bar between the inverter circuit and the DC power source, a currentsensor located between the capacitor and the DC power source on thepositive electrode bus bar or the negative electrode bus bar, adetermination means configured to control the switching elements inresponse to the current sensor not detecting a flow of current when themotor stops operating and configured to determine whether or not thecurrent sensor detects a flow of current when controlling the switchingelements, and a discharge starting means configured to start dischargingthe capacitor when the determination means determines that the flow ofcurrent has not been detected.
 2. The motor-driven compressor accordingto claim 1, wherein when the determination means determines that theflow of current has not been detected, the discharge starting means isconfigured to start controlling the switching elements and startenergizing the coil of the motor in order to start discharging thecapacitor.
 3. A motor-driven compressor for a vehicle comprising: ahousing; a compression unit arranged in the housing; a motor arranged inthe housing and configured to drive the compression unit; and aninverter device that supplies the motor with power, wherein the inverterdevice includes an inverter circuit including a plurality of switchingelements that are bridge-connected between a positive electrode bus barand a negative electrode bus bar that are connected to a DC powersource, wherein the inverter circuit is configured to drive the motor byexecuting activation and deactivation control on the switching elementsto convert DC power from the DC power source into AC power and supplythe AC power to a coil of the motor, a capacitor connected to thepositive electrode bus bar and the negative electrode bus bar betweenthe inverter circuit and the DC power source, a current sensor locatedbetween the capacitor and the DC power source on the positive electrodebus bar or the negative electrode bus bar, and circuitry, wherein thecircuitry is configured to control the switching elements in response tothe current sensor not detecting a flow of current when the motor stopsoperating and is configured to determine whether or not the currentsensor detects a flow of current when controlling the switchingelements, and the circuitry is configured to start discharging thecapacitor when determining that the flow of current has not beendetected.
 4. The motor-driven compressor according to claim 3, whereinwhen the circuitry determines that the flow of current has not beendetected, the circuitry is configured to start controlling the switchingelements and start energizing the coil of the motor in order to startdischarging the capacitor.